<%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<html>
  <head>
    <base href="<%=basePath%>">
    <title>My JSP 'regExp.jsp' starting page</title>
  </head>
  <script type="text/javascript">
  	function load(){
  		var sToMatch = "cat";
  		var regCat=/cat/;
  		alert(regCat.exec(sToMatch));
  	}
  </script>
  <body onload="load()">
     
  </body>
</html>
